class UploadedFile < ActiveRecord::Base
	
	def file=(uploaded_file)
		puts ">>>>>>>>>>>>>>>>>>>>  image.original_filename"
		self.name = new_dish.name
		self.description = new_dish.description
		self.image_url = base_part_of(image.original_filename)
	end
	
	def base_part_of(file_name)
		File.basename(file_name).gsub(/[^\w._-]/, '')
	end
	
end
